from fastapi import APIRouter, Depends
from app.core.responses import Response
from app.schemas.user_condition import Condition
from app.services.auth import get_current_user
from app.services.user_condition import UserCondition

router = APIRouter()


@router.post('/user_condition')
def store(form: Condition, user: str = Depends(get_current_user)):
    if UserCondition.create(user.id, form):
        return Response.message('操作成功')
